XML File Format

Each file will start with the following header giving creation date, time, version information and the command that was used during the creation.

<?xml version="1.0" encoding="UTF-8"?>
<Header>
    <Title>Helix QAC XML Output</Title>
    <Date>07/09/2018</Date> <Time>09:19:38</Time>
    <CreationCommand>/home/steve/Perforce/Helix-QAC-2019.1/common/lib/qacli view -P . -m
    <Version>2.4.0.9593-qax</Version>
</Header>

Then a section will detail the file being processed and its full absolute filename.

<File>
<Name>/home/steve/.config/Perforce/Helix-QAC-2019.1/samples/main.cpp</Name>

If annotated source output has been requested then the code will be output with the corresponding line number:

<File>
    <Source line="1">#include <iostream></Source>

Then, there will be a separate element for each diagnostic that is produced. The content of the diagnostic is controlled by the ‑‑xml‑format and ‑‑format options:

<Diag id="1">
    <Line>0</Line>
    <Column>0</Column>
    <MsgNum>999</MsgNum>
    <MsgText> QAC++ Deep Flow Static Analyser 4.3.0-41497</MsgText> 
</Diag>

A diagnostic may contain 0 or more sub-diagnostics. If any are present they will be denoted with the SubDiag element and contain an attribute with an incrementing id. For example:

<Diag id="94">
    <Line>119</Line>
    <Column>15</Column>
    <MsgNum>2647</MsgNum>
    <MsgText>This class declares some special member functions
        </MsgText>
    <SubDiag id="1">
        <Line>128</Line>
        <Column>3</Column>
        <MsgNum>1594</MsgNum>
        <MsgText>'MultipartHeader(::cgicc::MultipartHeader
            const &amp;)'declared here.</Msg> 
    </SubDiag>
    <SubDiag id="2">
        <Line>129</Line>
        <Column>4</Column>
        <MsgNum>1594</MsgNum>
        <MsgText>'~MultipartHeader()' declared here.</MsgText>
        </SubDiag>
</Diag>

At the end of the file will be two elements indicating if there were any analysis errors and the return code of the analysis process. Any non-zero value should be investigated.

<AnalysisErrorCount>0</AnalysisErrorCount>
<AnalysisExitStatus>0</AnalysisExitStatus>

Finally, an optional element may be output if there are no analysis diagnostics for a file:

<NoDiagsOK>true</NoDiagsOK>

A value of ’true’ indicates the file has been analyzed and there are no diagnostics. The value of ’false’ indicates that no analysis has been done on the file.